package pet;
import java.awt.desktop.PrintFilesEvent;
import java.util.Scanner;
public class test {
	public static void main(String args[]) {
	    cat a=new cat();cat b=new cat();cat c=new cat();
	    a.setNo(01);a.setVariety("波斯猫");a.setPrice(300);a.setNumber(3);
	    b.setNo(02);b.setVariety("加菲猫");b.setPrice(400);b.setNumber(3);
	    c.setNo(03);c.setVariety("布偶猫");c.setPrice(500);c.setNumber(3);
	    dog d=new dog();dog e=new dog();dog f=new dog();
	    d.setNo(04);d.setVariety("哈士奇");d.setPrice(600);d.setNumber(3);
	    e.setNo(05);e.setVariety("拉布拉多");e.setPrice(300);e.setNumber(3);
	    f.setNo(06);f.setVariety("藏獒");f.setPrice(400);f.setNumber(3);
	  System.out.println("所有宠物信息为：\n猫类信息如下：");
	  System.out.println(a.toString1()+a.toString());
	  System.out.println(b.toString1()+b.toString());
	  System.out.println(c.toString1()+c.toString());
	  System.out.println("狗类信息如下：");
	  System.out.println(d.toString1()+d.toString());
	  System.out.println(e.toString1()+e.toString());
	  System.out.println(f.toString1()+f.toString());           //展示所有宠物
	  Scanner A= new Scanner(System.in);
	System.out.println("请输入你要购买宠物的品种和数量：");
	int var= A.nextInt();
	int num= A.nextInt();                                     //购买宠物
	System.out.println("购买清单：");
	double sum=num*no.getPrice();
	System.out.println("品种："+var+"数量："+num+"价格合计："+num*no.getPrice()+"总价钱"+sum);
	}
}
